//@author A0096759E

package logic;

public class CommandChecker {

	private static final String COMMAND_MODIFY = "modify";
	private static final String COMMAND_MARK = "mark";
	private static final String COMMAND_REDO = "redo";
	private static final String COMMAND_UNDO = "undo";
	private static final String COMMAND_HELP = "help";
	private static final String COMMAND_SORT = "sort";
	private static final String COMMAND_SEARCH = "search";
	private static final String COMMAND_CLEAR = "clear";
	private static final String COMMAND_DISPLAY = "display";
	private static final String COMMAND_DELETE = "delete";
	private static final String COMMAND_ADD = "add";

	/**
	 * Checks whether the input string is an add command
	 * @param userCommand
	 * @return whether it is true that it is an add command
	 */
	public boolean checkAdd(String userCommand) {
		switch (userCommand) {
		case COMMAND_ADD:
			return true;
		}
		return false;
	}
	
	/**
	 * Checks whether the input string is a delete command
	 * @param userCommand
	 * @return whether it is true that it is a delete command
	 */
	public boolean checkDelete(String userCommand) {
		switch (userCommand) {
		case COMMAND_DELETE:
			return true;
		}
		return false;
	}
	
	/**
	 * Checks whether the input string is a display command
	 * @param userCommand
	 * @return whether it is true that it is a display command
	 */
	public boolean checkDisplay(String userCommand) {
		switch (userCommand) {
		case COMMAND_DISPLAY:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a clear command
	 * @param userCommand
	 * @return whether it is true that it is a clear command
	 */
	public boolean checkClear(String userCommand) {
		switch (userCommand) {
		case COMMAND_CLEAR:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a search command
	 * @param userCommand
	 * @return whether it is true that it is a search command
	 */
	public boolean checkSearch(String userCommand) {
		switch (userCommand) {
		case COMMAND_SEARCH:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a sort command
	 * @param userCommand
	 * @return whether it is true that it is a sort command
	 */
	public boolean checkSort(String userCommand) {
		switch (userCommand) {
		case COMMAND_SORT:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a help command
	 * @param userCommand
	 * @return whether it is true that it is a help command
	 */
	public boolean checkHelp(String userCommand) {
		switch (userCommand) {
		case COMMAND_HELP:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a undo command
	 * @param userCommand
	 * @return whether it is true that it is a undo command
	 */
	public boolean checkUndo(String userCommand) {
		switch (userCommand) {
		case COMMAND_UNDO:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a redo command
	 * @param userCommand
	 * @return whether it is true that it is a redo command
	 */
	public boolean checkRedo(String userCommand) {
		switch (userCommand) {
		case COMMAND_REDO:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a mark command
	 * @param userCommand
	 * @return whether it is true that it is a mark command
	 */
	public boolean checkMark(String userCommand) {
		switch (userCommand) {
		case COMMAND_MARK:
			return true;
		}
		return false;
	}

	/**
	 * Checks whether the input string is a modify command
	 * @param userCommand
	 * @return whether it is true that it is a modify command
	 */
	public boolean checkModify(String userCommand) {
		switch (userCommand) {
		case COMMAND_MODIFY:
			return true;
		}
		return false;
	}


}
